package org.example.mallweb.mallservice.service;

import org.example.mallcommon.result.ReturnResult;
import org.example.mallcommon.vio.SearchPageVio;
import org.example.mallcommon.vo.SearchVo;

import java.io.IOException;

/**
 * @author 韩先楚
 * es服务接口
 */
public interface ElasticSearchService {

    /**
     * 根据Id删除es数据
     */
    public void deleteById(Long id) throws IOException;

    /**
     * 新增或修改es数据
     */
    public void saveOrUpdate(SearchVo searchVo) throws IOException;

    //es搜索文章
    ReturnResult<SearchPageVio> searchArticle(Integer page, Integer size, String keywords) throws IOException;
}
